package lab01;

public class Test05 {
    public static void main(String[] args) {
    int n=Integer.parseInt(args[0]);
    int sum=0;
        //for语句
         for(int i=1;i<=n;i++){
            sum=sum+i;
        }
        System.out.println(sum);
        //while语句
        int i=1;
        sum=0;
        while(i<=n);{
            sum=sum+1;i++;
        }
        System.out.println(sum);
        //do while语句
        i=1;
        sum=0;
        do {
            sum =sum+i;

        }while(i<=n);
        System.out.println(sum);
    }
}
